const Sequelize = require('sequelize');
module.exports = function (sequelize) {
  return sequelize.define(
    "rese",  // 表名
    {
      resType: {  // 资源类型
        type: Sequelize.STRING(10),
        allowNull: false,
      },
      resTitle: {  // 标题
        type: Sequelize.STRING(20),
        allowNull: false,
      },
      resClass: {  // 标签
        type: Sequelize.STRING(20),
        allowNull: true,
      },
      resDescription: {  // 描述
        type: Sequelize.TEXT(0),
        allowNull: false,
      },
      resPath: {  // 路径
        type: Sequelize.STRING(255),
        allowNull: false,
      },
      resFaceImg: {  // 封面图片
        type: Sequelize.STRING(255),
        allowNull: false,
      }
    }
  )
};